package edu.spec.wechat.dao.impl;

import edu.spec.wechat.dao.iface.IWechatMenuDao;
import edu.spec.wechat.model.WechatMenu;
import org.madgecko.basic.dao.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by MadFrog on 2016/10/28.
 */
@Repository("wechatMenuDao")
public class WechatMenuDao extends BaseDao<WechatMenu> implements IWechatMenuDao {
    @Override
    public WechatMenu loadByKey(String key) {
        return (WechatMenu) super.queryObject("from WechatMenu where menuKey=?", key);
    }

    @Override
    public List<WechatMenu> listAll() {
        return super.list("from WechatMenu");
    }
}
